home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / olrdrs / apgp211.zip / CHECKSIG.BAT < prev    next >
DOS Batch File  |  1994-06-26  |  1KB  |  49 lines

  1. @echo off
  2.  
  3. rem Run this file to check signature
  4. rem certificates for AutoPGP .EXE files
  5.  
  6. ::: Thanks to John DeHaven for this file
  7.  
  8. if "_RESTART"=="%1" goto RESTART
  9.  
  10. if ""=="%PGPPATH%" echo Please set your PGPPATH variable first.
  11. if ""=="%PGPPATH%" goto END
  12.  
  13. echo Checking for certifying key on public ring.
  14. echo.
  15. pgp +batchmode +verbose=0 -kv "Stale Schumacher" > nul
  16. if not errorlevel 1 goto CHECKIT
  17. pgp +batchmode +verbose=0 -ka key.asc > nul
  18. if not errorlevel 1 goto KEYADDED
  19. echo ERROR: could not find key for "Stale Schumacher"
  20. echo        and could not find file KEY.ASC to add it...
  21. goto END
  22.  
  23. :KEYADDED
  24.    echo You did not have Stale Schumacher's public key.
  25.    echo For now, we will use the key in KEY.ASC, but it is
  26.    echo strongly recommended that you obtain it from an 
  27.    echo independent source, such as a public key server.
  28.    echo.
  29.  
  30. :CHECKIT
  31.    %0 _RESTART DECRYPT ENCRYPT INSTALL REGISTER
  32.  
  33. :RESTART
  34.    shift
  35.    if ""=="%1" goto end
  36.    if not exist %1.sig echo Cannot find file %1.SIG.
  37.    if not exist %1.sig goto RESTART
  38.    if not exist %1.exe echo Cannot find file %1.EXE.
  39.    if not exist %1.exe goto RESTART
  40.    pgp +batchmode +verbose=0 %1.sig %1.exe > nul
  41.    if not errorlevel 1 echo OK: %1.EXE checks good!
  42. if not errorlevel 1 goto RESTART
  43.  
  44.    echo !!! WARNING !!!
  45.    echo %1.EXE FAILED certification check...
  46. goto RESTART
  47.  
  48. :END
  49.